-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rdrp 1015 s3 config: s3 parameters are now read from the dev config, not hardcoded. #353
Conversation
…3 parameters from the s3 mods and from singleton boto class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi George, I was quite impressed with what you got working.
I have also talked to Copilot about how to do it with just one singleton class, and I've created another PR with possibly a simpler solution, can you see what you think?
@@ -63,7 +63,7 @@ s3_paths: | |||
freezing_additions_path: "02_freezing/freezing_updates" | |||
freezing_amendments_path: "02_freezing/freezing_updates" | |||
# Imputation and outliers input paths | |||
backdata_path: "2022_surveys/BERD/06_imputation/backdata_output/2022_backdata_anon.csv" | |||
backdata_path: "/bat/res_dev/project_data/2021_surveys/BERD/06_imputation/backdata_output/2021_backdata_published_v347_anon.csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi George, I've corrected this, but it looks like you've put it back to how it was before. I suggest we have 2022 data for 2023 imputation, not 2021.
Bucket=config["s3"]["s3_bucket"] | ||
cls._instance = Bucket | ||
return cls._instance | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really impressed you got this to work !
A couple of questions though: could this go in the same script as singleton_boto.py?
Could this second method be a method on the boto class? That was what I was trying to do.
Important thing is to get it working in Mig.
@classmethod | ||
def get_config(cls, config={}): # , bucket_str= None): | ||
if cls._instance is None: | ||
Bucket=config["s3"]["s3_bucket"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why Bucket has a capital, and why it shows as a different colour here?
Pull Request submission
Insert detailed bullet points about your changes here!
Insert any instructions to help the reviewer, e.g. "install new requirements from
requirements.txt
"*Let the reviewer know what data files are needed (and if applicable, where they are to be found)
Closes or fixes
Closes #
Code
Documentation
Any new code includes all the following forms of documentation:
Args
andreturns
for all major functionsData
Testing
Peer Review Section
requirements.txt
Final approval (post-review)
The author has responded to my review and made changes to my satisfaction.
Review comments
Insert detailed comments here!
These might include, but not exclusively:
that it is likely to interact with?)
works correctly?)
Your suggestions should be tailored to the code that you are reviewing.
Be critical and clear, but not mean. Ask questions and set actions.